/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI.MAINMENU;

import GUI.FUNCTION.CUSTOMER.FunctionAddCustomer;
import GUI.FUNCTION.CUSTOMER.FunctionFindCustomer;
import java.awt.Color;
import java.awt.Component;
import java.awt.Image;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author wonka
 */
public class MenuCustomer extends org.jdesktop.swingx.JXPanel {
    /**
     * Creates new form Home
     */
    public MenuCustomer() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        jXLabel1 = new org.jdesktop.swingx.JXLabel();
        jXPanel5 = new org.jdesktop.swingx.JXPanel();
        lb_FindCustomer = new org.jdesktop.swingx.JXLabel();
        lb_AddCustomer = new org.jdesktop.swingx.JXLabel();
        lb_BorrowBill = new org.jdesktop.swingx.JXLabel();
        lb_PayBillb = new org.jdesktop.swingx.JXLabel();
        jXLabel10 = new org.jdesktop.swingx.JXLabel();

        setBackground(new java.awt.Color(230, 252, 217));
        setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        setAutoscrolls(true);
        setScrollableHeightHint(org.jdesktop.swingx.ScrollableSizeHint.FIT);
        setScrollableWidthHint(org.jdesktop.swingx.ScrollableSizeHint.FIT);
        addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentResized(java.awt.event.ComponentEvent evt) {
                formComponentResized(evt);
            }
        });

        jXLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/Medium_Customer.png"))); // NOI18N
        jXLabel1.setText("KHÁCH HÀNG");
        jXLabel1.setFont(new java.awt.Font("Segoe UI Semibold", 3, 36)); // NOI18N

        jXPanel5.setBackground(new java.awt.Color(230, 252, 217));
        jXPanel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jXPanel5.setMinimumSize(new java.awt.Dimension(686, 470));
        jXPanel5.setPreferredSize(new java.awt.Dimension(300, 250));
        jXPanel5.setScrollableHeightHint(org.jdesktop.swingx.ScrollableSizeHint.FIT);
        jXPanel5.setScrollableWidthHint(org.jdesktop.swingx.ScrollableSizeHint.FIT);
        jXPanel5.setLayout(new java.awt.GridBagLayout());

        lb_FindCustomer.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lb_FindCustomer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/Big_FindCustomer.png"))); // NOI18N
        lb_FindCustomer.setText("Tra Cứu Khách Hàng");
        lb_FindCustomer.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        lb_FindCustomer.setEnabled(false);
        lb_FindCustomer.setFont(new java.awt.Font("Segoe UI Semilight", 1, 14)); // NOI18N
        lb_FindCustomer.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        lb_FindCustomer.setIconTextGap(6);
        lb_FindCustomer.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        lb_FindCustomer.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                lb_FindCustomerMouseExited(evt);
            }
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lb_FindCustomerMouseClicked(evt);
            }
        });
        lb_FindCustomer.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                lb_FindCustomerMouseMoved(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.ipadx = 34;
        gridBagConstraints.ipady = 8;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 82, 0, 0);
        jXPanel5.add(lb_FindCustomer, gridBagConstraints);

        lb_AddCustomer.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        lb_AddCustomer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/Big_AddCustomer.png"))); // NOI18N
        lb_AddCustomer.setText("Tiếp Nhận Khách Hàng");
        lb_AddCustomer.setToolTipText("");
        lb_AddCustomer.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        lb_AddCustomer.setEnabled(false);
        lb_AddCustomer.setFont(new java.awt.Font("Segoe UI Semilight", 1, 14)); // NOI18N
        lb_AddCustomer.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        lb_AddCustomer.setIconTextGap(6);
        lb_AddCustomer.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        lb_AddCustomer.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                lb_AddCustomerMouseExited(evt);
            }
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lb_AddCustomerMouseClicked(evt);
            }
        });
        lb_AddCustomer.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                lb_AddCustomerMouseMoved(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.ipadx = 41;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(13, 11, 0, 0);
        jXPanel5.add(lb_AddCustomer, gridBagConstraints);

        lb_BorrowBill.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        lb_BorrowBill.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/Big_BorrowBill.png"))); // NOI18N
        lb_BorrowBill.setText("Lập Phiếu Vay");
        lb_BorrowBill.setToolTipText("");
        lb_BorrowBill.setEnabled(false);
        lb_BorrowBill.setFont(new java.awt.Font("Segoe UI Semilight", 1, 14)); // NOI18N
        lb_BorrowBill.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        lb_BorrowBill.setIconTextGap(6);
        lb_BorrowBill.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        lb_BorrowBill.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                lb_BorrowBillMouseExited(evt);
            }
        });
        lb_BorrowBill.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                lb_BorrowBillMouseMoved(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridheight = 4;
        gridBagConstraints.ipadx = 27;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(125, 11, 17, 0);
        jXPanel5.add(lb_BorrowBill, gridBagConstraints);

        lb_PayBillb.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lb_PayBillb.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/Big_PayBill.png"))); // NOI18N
        lb_PayBillb.setText("Lập Phiếu Thanh Toán Tiền Vay");
        lb_PayBillb.setToolTipText("");
        lb_PayBillb.setEnabled(false);
        lb_PayBillb.setFont(new java.awt.Font("Segoe UI Semilight", 1, 14)); // NOI18N
        lb_PayBillb.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        lb_PayBillb.setIconTextGap(6);
        lb_PayBillb.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        lb_PayBillb.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                lb_PayBillbMouseExited(evt);
            }
        });
        lb_PayBillb.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                lb_PayBillbMouseMoved(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.gridheight = 4;
        gridBagConstraints.ipadx = 27;
        gridBagConstraints.ipady = 9;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(116, 33, 17, 11);
        jXPanel5.add(lb_PayBillb, gridBagConstraints);

        jXLabel10.setForeground(new java.awt.Color(255, 255, 102));
        jXLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jXLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/Big_Customer.png"))); // NOI18N
        jXLabel10.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.gridheight = 3;
        gridBagConstraints.ipadx = 29;
        gridBagConstraints.ipady = 14;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(6, 30, 0, 0);
        jXPanel5.add(jXLabel10, gridBagConstraints);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(jXLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(394, 394, 394))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jXPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(23, 23, 23))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jXLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jXPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, 471, Short.MAX_VALUE)
                .addGap(27, 27, 27))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void lb_AddCustomerMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_AddCustomerMouseMoved
        // TODO add your handling code here:
        lb_AddCustomer.setEnabled(true);
    }//GEN-LAST:event_lb_AddCustomerMouseMoved

    private void lb_AddCustomerMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_AddCustomerMouseExited
        // TODO add your handling code here:
        lb_AddCustomer.setEnabled(false);
    }//GEN-LAST:event_lb_AddCustomerMouseExited

    private void lb_FindCustomerMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_FindCustomerMouseMoved
        // TODO add your handling code here:
          lb_FindCustomer.setEnabled(true);
    }//GEN-LAST:event_lb_FindCustomerMouseMoved

    private void lb_FindCustomerMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_FindCustomerMouseExited
        // TODO add your handling code here:
          lb_FindCustomer.setEnabled(false);
    }//GEN-LAST:event_lb_FindCustomerMouseExited

    private void lb_BorrowBillMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_BorrowBillMouseMoved
        // TODO add your handling code here:
          lb_BorrowBill.setEnabled(true);
    }//GEN-LAST:event_lb_BorrowBillMouseMoved

    private void lb_BorrowBillMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_BorrowBillMouseExited
        // TODO add your handling code here:
          lb_BorrowBill.setEnabled(false);
    }//GEN-LAST:event_lb_BorrowBillMouseExited

    private void lb_PayBillbMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_PayBillbMouseMoved
        // TODO add your handling code here:
         lb_PayBillb.setEnabled(true);
    }//GEN-LAST:event_lb_PayBillbMouseMoved

    private void lb_PayBillbMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_PayBillbMouseExited
        // TODO add your handling code here:
          lb_PayBillb.setEnabled(false);
    }//GEN-LAST:event_lb_PayBillbMouseExited

    private void lb_AddCustomerMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_AddCustomerMouseClicked
        // TODO add your handling code here:
         FunctionAddCustomer child;
        try {
            child = new FunctionAddCustomer();
            child.setVisible(true);
            child.setSize( this.getSize());
            this.removeAll();
            this.add(child);
            this.validate();
         this.repaint();
        } catch (Exception ex) {
            Logger.getLogger(MenuCustomer.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }//GEN-LAST:event_lb_AddCustomerMouseClicked

    private void formComponentResized(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentResized
        // TODO add your handling code here:
        Component c = this.getComponent(0);
        c.resize(this.getSize());
        c.setPreferredSize(this.getPreferredSize());
        c.revalidate();
        c.repaint();
    }//GEN-LAST:event_formComponentResized

    private void lb_FindCustomerMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lb_FindCustomerMouseClicked
        // TODO add your handling code here:
        FunctionFindCustomer child;
        try {
            child = new  FunctionFindCustomer();
            child.setVisible(true);
            child.setSize( this.getSize());
            this.removeAll();
            this.add(child);
            this.validate();
            this.repaint();
        } catch (Exception ex) {
            Logger.getLogger(MenuCustomer.class.getName()).log(Level.SEVERE, null, ex);
        }
       
        
    }//GEN-LAST:event_lb_FindCustomerMouseClicked

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private org.jdesktop.swingx.JXLabel jXLabel1;
    private org.jdesktop.swingx.JXLabel jXLabel10;
    private org.jdesktop.swingx.JXPanel jXPanel5;
    private org.jdesktop.swingx.JXLabel lb_AddCustomer;
    private org.jdesktop.swingx.JXLabel lb_BorrowBill;
    private org.jdesktop.swingx.JXLabel lb_FindCustomer;
    private org.jdesktop.swingx.JXLabel lb_PayBillb;
    // End of variables declaration//GEN-END:variables
}
